package jps_s10996_s7175.result;

import jps_s10996_s7175.utils.IPrintable;
import edu.pjwstk.jps.result.IAbstractQueryResult;
import edu.pjwstk.jps.result.IBinderResult;

public class BinderResult extends SingleResult implements IBinderResult,
		IPrintable {

	private final String name;
	private final IAbstractQueryResult result;

	public BinderResult(String name, IAbstractQueryResult result) {
		this.name = name;
		this.result = result;
	}

	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public IAbstractQueryResult getValue() {
		return this.result;
	}
	
	@Override
	public String stringme() {
		String result = "";
		//result += "binder(name=\"";
		////result += getName();
		//result += "\", value=\"";
		//result += ((QueryResult) getValue()).stringme();
		//result += "\")";
		result += "<" + getName() + "," + (getValue()) + ">";
		return result;
	}

	@Override
	public String toString() {
		String result = "";
		//result += "binder(name=\"";
		////result += getName();
		//result += "\", value=\"";
		//result += ((QueryResult) getValue()).stringme();
		//result += "\")";
		result += "<" + getName() + "," + (getValue()) + ">";
		return result;
	}

}
